<?php
namespace Api\Controller;
class KnowledgeController extends CommonController {
 

    public function listinfo(){
      $Knowledge= D('Knowledge')->blist(6);
      EchoData($Knowledge);
    }
    public function KnowledgeDetails(){
    	$where['id']=I('id');
    	$Knowledge=fd('knowledge',$where);
    	EchoData($Knowledge);
    }
    //返回知识详情
    public function knowledgeUrl(){
        $where['id']=I('id');
    	$Knowledge=fd('knowledge',$where);
        // dump(htmlspecialchars_decode($Knowledge['content']));
    	$this->assign('Knowledgeinfo',htmlspecialchars_decode($Knowledge['content']));
        $this->assign('title',$Knowledge['title']);
    	$this->display();
    }
    //更多知识信息
    public function moreNewsList(){
    	$page=I('pages');
    	$pages=$page?$page:1;
    	$knowledgeinfo=arr_time(st('knowledge','','id,ctime,img,title','',$pages),'ctime','d');
    	EchoData($knowledgeinfo);
    }

    public function moreNewsListH5(){
        $page=I('pages');
        $pages=$page?$page:1;
        $knowledgeinfo=arr_time(st('knowledge','','id,ctime,img,title','',$pages),'ctime','d');
        $this->assign('knowledgeinfo',$knowledgeinfo);
        $this->display();
    }
}